<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue.extend</title>
    <script src="../assets/js/vue.js"></script>
</head>
<body>
    
    <author></author>

    <script>
        /*还可以通过HTML标签上的id或者class来生成扩展实例构造器，Vue.extend里的代码是一样的*/
        var authorExtend = Vue.extend({
            template:"<p><a :href='authorUrl'>{{authorName}}</a></p>",
            data:function(){
                return{
                    authorName:'JSPang',
                    authorUrl:'http://www.jspang.com'
                }
            }
        });
        new authorExtend().$mount('author');
    </script>
</body>
</html>